﻿#include "UFourListUMG.h"

#include "ListLibrary/ListUIStyle.h"

UFourListUMG::UFourListUMG()
{

}

TSharedRef<SWidget> UFourListUMG::RebuildWidget()
{
	FourList = SNew(SFourList);
	return FourList.ToSharedRef();
}

const FText UFourListUMG::GetPaletteCategory()
{
	return FText::FromString(TEXT("小辉辉"));
}

//资源释放
void UFourListUMG::ReleaseSlateResources(bool bReleaseChildren)
{
	Super::ReleaseSlateResources(bReleaseChildren);
	FourList.Reset();
}

void UFourListUMG::UpDataList(int width,TMap<FString,FFourListInfo> ListData)
{
	FourList->UpDataList(width,ListData);
}

//更新UI
void UFourListUMG::SynchronizeProperties()
{
	Super::SynchronizeProperties();
	FourList->UpDataTitleName(Title);
	FourList->UpDataOneInfoName(OneInfo);
	FourList->UpDataTwoInfoName(TwoInfo);
	FourList->UpDataThreeInfoName(ThreeInfo);
	FourList->UpDataFourInfoName(FourInfo);
}